package com.jackiechan.dao.Impl;

import com.jackiechan.dao.TeachersDao;
import com.jackiechan.domain.Teachers;
import com.jackiechan.util.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class TeachersDaoImpl implements TeachersDao {
    @Override
    public List<Teachers> selectTeachers() {
        return null;
    }

    @Override
    public int insertTeacher(Teachers teacher) {
        SqlSession sqlSession = MyBatisUtils.getSqlSession();
        String sqlId = "com.jackiechan.dao.TeachersDao"+"."+"insertTeacher";
        int count = sqlSession.insert(sqlId,teacher);
        sqlSession.commit();
        sqlSession.close();
        return count;
    }

    @Override
    public List<Teachers> selectLikeTeacherOne(String prof) {
        return null;
    }

    @Override
    public List<Teachers> selectLikeTeacherTwo(String prof) {
        return null;
    }
}
